<template>
    <div>{{ msg }}</div> 
    <div>{{ data }}</div> 
    <div>{{ age }}</div> 
   </template>
   
   <script setup>
   import { reactive, toRefs } from 'vue'
   const obj = reactive({
       msg: '不畏浮云遮望眼，只缘身在最高层',
       data: '小明',
       age:19
   })
//    const {msg } = obj  // 这么做会失去响应式
   const {msg, data, age} = toRefs(obj)
   setTimeout(() => {
      msg.value = '欲穷千里目，更上一层楼'
   }, 3000);
   
   </script>
   
   <style>
   
   </style>